package com.ynet.middleground.contract.bean;

import java.io.Serializable;
import java.util.List;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author liulx
 * @description 签署文件、印章、签名域等信息
 * @date 2020-04-20 13:55
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "人脸签署文件、印章、签名域等信息", description = "人脸签署文件、印章、签名域等信息")
public class SigningInfoBean implements Serializable {

    private static final long serialVersionUID = 2864012940331030186L;

    @ApiModelProperty(value = "PDF 文件短路径地址(包含 Bucket) \n  如：zhongtai/file.pdf",
        notes = "PDF 文件短路径地址(包含 Bucket) \n  如：zhongtai/file.pdf", dataType = "String", required = true)
    @NotBlank(message = "PDF 文件地址不能为空")
    private String pdfUrl;

    @ApiModelProperty(value = "印章图片 id\n注意：印章数据要和账户信息对应，否则会出现签署的印章和背后的数字证书不一致的情况，从而造成签署纠纷",
        notes = "印章图片 id\n注意：印章数据要和账户信息对应，否则会出现签署的印章和背后的数字证书不一致的情况，从而造成签署纠纷", dataType = "Integer", required = true)
    @NotNull(message = "印章图片 id 不能为空")
    private Integer sealId;

    /**
     * e 签宝人脸批量签署，暂不支持文件标识，该字段先保留
     */
    /*@ApiModelProperty(value = "客户自由标示位，用于辨识文件", notes = "客户自由标示位，用于辨识文件", dataType = "String")
    private String markBit;*/

    @ApiModelProperty(value = "文档编辑密码，当目标 PDF 设置权限保护时必填", notes = "文档编辑密码，当目标 PDF 设置权限保护时必填", dataType = "String")
    private String ownerPassword;

    @ApiModelProperty(value = "签章位置信息列表", notes = "签章位置信息列表", required = true)
    @NotNull(message = "签章位置信息不能为空")
    private List<SignPos> signPos;

    @ApiModelProperty(value = "签章类型\nSingle: 单页签章\nMulti: 多页签章\nEdges: 签骑缝章\nKey: 关键字签章",
        notes = "签章类型\nSingle: 单页签章\nMulti: 多页签章\nEdges: 签骑缝章\nKey: 关键字签章", dataType = "String", required = true)
    @NotBlank(message = "签章类型不能为空")
    private String signType;

    @ApiModelProperty(value = "合约 id", notes = "合约 id", dataType = "Integer")
    private Integer contractId;

    @ApiModelProperty(value = "客户自由标示位，用于辨识文件，每次请求时不可与本次请求的其他文件标识位重复", notes = "客户自由标示位，用于辨识文件，每次请求时不可与本次请求的其他文件标识位重复",
            dataType = "String", required = true)
    @NotBlank(message = "客户自由标示位不能为空")
    private String markBit;

}
